package org.csu.mypetstore.service;

import org.csu.mypetstore.domain.Account;
import org.csu.mypetstore.persistence.AccountMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountService {
    @Autowired
    AccountMapper accountMapper;

    public Account getAccountByUserId(String userId){
        return accountMapper.getAccountByUsername(userId);
    }
    public List<Account> getAllAccount(){return accountMapper.getAllAccount();}

     public void deleteAccount(String username){
        System.out.print(15);
        accountMapper.deleteAccount(username);

     }
}
